//搜索选择下拉
$.extend ({ 
	yxpAlertMsg:function(msg,callback) {
		if($(".stratum_msg").length >0){
			
		}else{
			this.initHtml();
		}
		$(".stratum_msg .stratum-block_confirm").hide();
		$(".stratum_msg .stratum-block").show();
		$(".stratum_msg .stratum-block label").text(msg);
		$(".stratum_msg").fadeIn();
		$(".stratum_msg input").unbind ( 'click' ).click(function(){
			$(".stratum_msg").fadeOut();
			if(callback){
				callback();
			}
			
		});
	
	},
	yxpTarget:function(targeturl,callback) {
		if($(".stratum_msg").length >0){
		}else{
			//this.initTarget(targeturl);
		}
		
		$(".stratum_msg").fadeIn();
		
	
	},
	yxpConfirmMsg:function(msg,callback) {
		if($(".stratum_msg").length >0){
			
		}else{
			this.initHtml();
		}
		$(".stratum_msg .stratum-block_confirm").show();
		$(".stratum_msg .stratum-block").hide();
		$(".stratum_msg .stratum-block_confirm label").text(msg);
		$(".stratum_msg").fadeIn();
		$(".stratum_msg .stratum-block_confirm .queding").unbind ( 'click' ).click(function(){
			$(".stratum_msg").hide();
			if(callback){
				callback();
			}
		});
		$(".stratum_msg .stratum-block_confirm .fanhui").unbind ( 'click' ).click(function(){
			$(".stratum_msg").fadeOut();
		});
	},
	initHtml:function(){
		var alertHtml =	'<div class="stratum_msg" style="display: none">	\
			\n	    <div class="stratum-block_confirm">	\
			\n	            <h3>消息 </h3>	\
			\n	            <label>	\
			\n	            </label>	\
			\n	            <input type="button" class="queding" value="确定">	\
			\n	            <input type="button" class="fanhui" value="返回">	\
			\n	    </div>	\
			\n	    <div class="stratum-block">	\
			\n	            <h3>消息 </h3>	\
			\n	            <label>	\
			\n	            </label>	\
			\n	            <input type="button" class="queding" value="确定">	\
			\n	    </div>	\
			\n	</div>	';
		var $alert=$(alertHtml);
		$alert.click(function(){
			$(this).fadeOut();
		});
		$alert.children().click(function(e){
			e.stopPropagation();
		});
		$("body").append($alert);
	},
	initTarget:function(){
		var frameHtml =	'<div class="stratum_msg" style="display: none">	\
				\n <iframe>\
				\n </div>	';
		var $alert=$(alertHtml);
		$alert.click(function(){
			$(this).fadeOut();
		});
		$alert.children().click(function(e){
			e.stopPropagation();
		});
		$("body").append($alert);
	}
	
});

